#pragma once

#ifndef _Flying_h_
#define _Flying_h_

#include "FlyingState.h"
#include "../Framework/Mesh.h"

namespace MyGame {

using namespace Framework;

class Flying abstract :
            public Mesh {
public:
    Flying(Game* game);
    virtual ~Flying(void);
    FLOAT GetAcceleration() const;
    void SetAcceleration(FLOAT val);
    D3DXVECTOR3 GetDirection() const;
    void SetDirection(D3DXVECTOR3 val);
    FLOAT GetMaxAcceleration() const;
    void SetMaxAcceleration(FLOAT val);
    FLOAT GetMaxSpeed() const;
    void SetMaxSpeed(FLOAT val);
    FLOAT GetMinAcceleration() const;
    void SetMinAccelration(FLOAT val);
    FLOAT GetMinSpeed() const;
    void SetMinSpeed(FLOAT val);
    D3DXVECTOR3 GetModelDirection() const;
    void SetModelDirection(D3DXVECTOR3 val);
    D3DXVECTOR3 GetPrevPosition() const;
    FLOAT GetSpeed() const;
    void SetSpeed(FLOAT val);
    FlyingState GetState() const;
    void SetState(FlyingState val);
    FLOAT GetTurnSpeed() const;
    void SetTurnSpeed(FLOAT val);
    bool GetUsesFuel() const;
    void SetUsesFuel(bool val);
    void Accelerate();
    void Decelerate();
    void Explode();
    virtual void Update(FLOAT timeDelta);
private:
    FLOAT acceleration;
    bool isAccelerating;
    bool isDecelerating;
    FlyingState state;
    FLOAT maxAcceleration;
    FLOAT minAcceleration;
    FLOAT maxSpeed;
    FLOAT minSpeed;
    D3DXVECTOR3 direction;
    D3DXVECTOR3 modelDirection;
    D3DXVECTOR3 prevPosition;
    FLOAT speed;
    FLOAT timer;
    FLOAT turnSpeed;
    bool usesFuel;
};

}

#endif
